package com.bplow.deep.base.concurrent.synclock;

import org.springframework.aop.ClassFilter;
import org.springframework.aop.Pointcut;
import org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor;

@SuppressWarnings("serial")
public class BeanFactorySyncLockOperationSourceAdvisor extends AbstractBeanFactoryPointcutAdvisor{

	private SyncLockAttributeSource syncLockAttributeSource;

	private final SyncLockOperationSourcePointcut pointcut = new SyncLockOperationSourcePointcut() {

		@Override
		protected SyncLockAttributeSource getSyncLockAttributeSource() {
			return syncLockAttributeSource;
		}
		
	};
	
	public void setSyncLockAttributeSource(SyncLockAttributeSource syncLockAttributeSource) {
		this.syncLockAttributeSource = syncLockAttributeSource;
	}

	public void setClassFilter(ClassFilter classFilter) {
		this.pointcut.setClassFilter(classFilter);
	}
	
	
	@Override
	public Pointcut getPointcut() {
		return this.pointcut;
	}

}
